import { sandbox } from "@/libs/util";
export default {
  data() {
    return {
      loading: false,
      pagination: sandbox({
        currentPage: 1,
        pageIndex: 1,
        pageSize: 10,
        total: 0,
        background: false,
        layout: "total,  prev, pager, next, jumper",
      }),
    };
  },
  methods: {
    handleCurrentChange(page) {
      this.pagination.pageIndex = page;
      this.fetchData();
    },
    handleSizeChange(val) {
      this.pagination.pageSize = val;
      this.fetchData();
    },
  },
  mounted() {
    this.fetchData();
  },
};
